<template>
    <el-dialog append-to-body :visible.sync="visible" width="800px" title="明细" :before-close="close">
        <el-table :data="list">
            <el-table-column label="核销类型">
                <!-- 核销状态 1未核销 2已核销 -->
                <template slot-scope="{row}">
                    <el-tag v-if="row.family_status == 1">未核销</el-tag>
                    <el-tag v-if="row.family_status == 2" type="success">已核销</el-tag>
                </template>
            </el-table-column>
            <el-table-column label="开始时间" prop="start_time">
                <template slot-scope="{row}">
                    {{ row.start_time | formatDate }}
                </template>
            </el-table-column>
            <el-table-column label="结束时间" prop="end_time">
                <template slot-scope="{row}">
                    {{ row.end_time | formatDate }}
                </template>
            </el-table-column>
            <el-table-column label="核销时间" prop="hx_time">
                <template slot-scope="{row}">
                    <span v-if="row.hx_time">{{ row.hx_time | formatDate }}</span>
                </template>
            </el-table-column>
            <el-table-column label="核销码">
                <template slot-scope="{row}">
                    <el-image style="width:60px;height:60px" :src="'https://mtang.zxkjnc.com' + row.qrcode"
                        :preview-src-list="['https://mtang.zxkjnc.com' + row.qrcode]">
                    </el-image>
                </template>
            </el-table-column>
        </el-table>
    </el-dialog>
</template>
<script>
export default {
    props: {
        list: {
            type: Array,
            default: () => []
        }
    },
    data(){
        return{
            visible:false
        }
    },
    methods:{
        open(){
            this.visible=true
        },
        close(){
            this.visible=false
        }
    }
}
</script>